import config from "@/config"
import http from "@/utils/request"

export default {
	menu: {
		myMenus: {
			url: `${config.API_URL}/adminapi/auth.menu/route`,
			name: "获取我的菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/adminapi/auth.menu/lists`,
			name: "获取菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/auth.menu/all`,
			name: "获取菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		allColumn: {
			url: `${config.API_URL}/adminapi/auth.menu/allColumn`,
			name: "获取菜单+字段",
			get: async function(){
				return await http.get(this.url);
			}
		},
		allColumnList: {
			url: `${config.API_URL}/adminapi/auth.menu/allColumnList`,
			name: "获取字段",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		checkall: {
			url: `${config.API_URL}/adminapi/auth.menu/checkall`,
			name: "获取菜单",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		checkColumnAll: {
			url: `${config.API_URL}/adminapi/auth.menu/checkColumnAll`,
			name: "获取菜单",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/auth.menu/add`,
			name: "添加菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/auth.menu/edit`,
			name: "编辑菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/auth.menu/delete`,
			name: "删除菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		get_last_id: {
			url: `${config.API_URL}/adminapi/auth.menu/get_last_id`,
			name: "获取id",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		updateSort: {
			url: `${config.API_URL}/adminapi/auth.menu/updateSort`,
			name: "拖动菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	dic: {
		tree: {
			url: `${config.API_URL}/system/dic/tree`,
			name: "获取字典树",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/system/dic/list`,
			name: "字典明细",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		get: {
			url: `${config.API_URL}/adminapi/system/dic/get`,
			name: "获取字典数据",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	role: {
		list: {
			url: `${config.API_URL}/adminapi/auth.role/lists`,
			name: "获取角色列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/auth.role/all`,
			name: "获取角色列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/auth.role/detail`,
			name: "获取角色详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/auth.role/add`,
			name: "添加角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/auth.role/edit`,
			name: "编辑角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/auth.role/delete`,
			name: "删除角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/auth.role/deleteAll`,
			name: "删除角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/auth.role/update_status`,
			name: "修改状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		set_permission: {
			url: `${config.API_URL}/adminapi/auth.role/set_permission`,
			name: "编辑权限",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	dept: {
		lists: {
			url: `${config.API_URL}/adminapi/dept.dept/lists`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		list: {
			url: `${config.API_URL}/adminapi/dept.dept/all`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/dept.dept/add`,
			name: "添加部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/dept.dept/edit`,
			name: "编辑部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/dept.dept/delete`,
			name: "删除部门",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/dept.dept/deleteAll`,
			name: "删除角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	jobs: {
		lists: {
			url: `${config.API_URL}/adminapi/dept.jobs/lists`,
			name: "获取岗位列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		list: {
			url: `${config.API_URL}/adminapi/dept.jobs/all`,
			name: "获取岗位列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/dept.jobs/add`,
			name: "添加岗位",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/dept.jobs/edit`,
			name: "编辑岗位",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/dept.jobs/delete`,
			name: "删除岗位",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/dept.jobs/deleteAll`,
			name: "删除角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		setRole: {
			url: `${config.API_URL}/adminapi/dept.jobs/batch_set_role`,
			name: "批量设置角色",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	user: {
		list: {
			url: `${config.API_URL}/adminapi/auth.admin/lists`,
			name: "获取用户列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	admin: {
		list: {
			url: `${config.API_URL}/adminapi/auth.admin/lists`,
			name: "获取管理员列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/auth.admin/add`,
			name: "添加管理员",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/auth.admin/edit`,
			name: "编辑管理员",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/auth.admin/delete`,
			name: "删除管理员",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/auth.admin/deleteAll`,
			name: "删除管理员",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		setPassword: {
			url: `${config.API_URL}/adminapi/auth.admin/batch_set_password`,
			name: "批量重置密码",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/auth.admin/all`,
			name: "全部人",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
	},
	app: {
		list: {
			url: `${config.API_URL}/system/app/list`,
			name: "应用列表",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	log: {
		list: {
			url: `${config.API_URL}/system/log/list`,
			name: "日志列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	table: {
		list: {
			url: `${config.API_URL}/system/table/list`,
			name: "表格列管理列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		info: {
			url: `${config.API_URL}/system/table/info`,
			name: "表格列管理详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	tasks: {
		list: {
			url: `${config.API_URL}/system/tasks/list`,
			name: "系统任务管理",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	miniMenu: {
		myMenus: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/route`,
			name: "获取我的菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/lists`,
			name: "获取菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/all`,
			name: "获取菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		allColumn: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/allColumn`,
			name: "获取菜单+字段",
			get: async function(){
				return await http.get(this.url);
			}
		},
		allColumnList: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/allColumnList`,
			name: "获取字段",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		checkall: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/checkall`,
			name: "获取菜单",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		checkColumnAll: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/checkColumnAll`,
			name: "获取菜单",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/add`,
			name: "添加菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/edit`,
			name: "编辑菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/delete`,
			name: "删除菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		get_last_id: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/get_last_id`,
			name: "获取id",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		updateSort: {
			url: `${config.API_URL}/adminapi/auth.mini_menu/updateSort`,
			name: "拖动菜单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
}
